var xmlhttp=false;

if (!xmlhttp && typeof XMLHttpRequest!='undefined')  {
     xmlhttp = new XMLHttpRequest();
     categoryTitleRequest = new XMLHttpRequest();
}

function ajax_call() {
     xmlhttp.open("GET", 'func.php', true);

     xmlhttp.onreadystatechange=function() {
           if (xmlhttp.readyState==4) {
                 document.getElementById('result').innerHTML = xmlhttp.responseText;
           }
     }

xmlhttp.send(null)
return false;
}

function getCategoryName(){
	categoryTitleRequest.open("GET", '../manageCategories.php?do=getCategoryName&id='+id, true);
	
	categoryTitleRequest.onreadystatechange=function(){
		if (categoryTitleRequest.readyState==4){
			document.getElementById('result').innerHTML = categoryTitleRequest.responseText;
		}
	}
	categoryTitleRequest.send(null);
	return false;	
}




/*
<script language="javascript" type="text/javascript" />

function createXMLHttpRequest(){

	var ua;
	
	if (window.XMLHttpRequest){
	
		try{
			ua = new XMLHttpRequest();
		}
		catch(e){
			ua = false;
		}
	}
	return ua;
}

var req = createXMLHttpRequest();

function sendRequest(){

	req.open('get', 'func.php');
	req.onreadystatechange = handleResponse;
	req.send(null);
}

function handleResponse(){

	if (req.readyState == 4){
		var response = req.resonseText;
		var update = new Array();
		
		if(response.indexOf('||' != -1)){
			update = response.split('||');
			document.getElementById(update[0].innerHTML = update[1]);
		}
	}
	else{
		alert("loading " + req.readyState);
	}
}
*/
